package cn.com.dev;

import cn.com.elite.Util;
import cn.com.kh.KHUtil;
import net.sf.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * @Title: cn.com.dev-TaoDev
 * @Description:ngsapitask-pa 系统API接口开发Demo，重点关注业务逻辑部分
 * @Author: lijun
 * @Date 2021-12-20 18:43
 */
public class TaoDev {
    private static final Logger log = LoggerFactory.getLogger(TaoDev.class);

    public static void main(String[] args) {

        String inData = "{\"code\":1,\"msg\":\"获取成功!\",\"data\":[{\"topic\":\"sync_external_user_status\",\"offset\":1790583,\"value\":{\"gender\":\"1\",\"mobile\":\"18603491462\",\"description\":\"\",\"remark\":\"D2-18603491462\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM65MqVFic46QMIfzPG5XUnBRX8cSUQ7lAvtMdb05TjCCUg/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660567179\",\"externalUserId\":\"wmhFfECAAAvZVxIDPDmgEEM6zhKO7z0A\",\"name\":\"18603491462\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790584,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"D2-\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM4FV86M5sF12l5iaBANk541kXBAibO3dsuGnxx48FbZRhVw/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660565974\",\"externalUserId\":\"wmhFfECAAAMIRbSOtZUNGg3b9t7-mf0g\",\"name\":\"雨夜听雨\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790585,\"value\":{\"gender\":\"2\",\"mobile\":\"18081031991\",\"description\":\"\",\"remark\":\"D2-18081031991\",\"avatar\":\"http://wx.qlogo.cn/mmhead/v6XbW38nFOQmGIqNdSib9PxuNFlgyib20iaKeLT2EgicIU01icaP1QT2fiaQ/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660563724\",\"externalUserId\":\"wmhFfECAAAOEGz2fBCgMMs7d6xD_nyhQ\",\"name\":\"\uD83C\uDF1FAmy\uD83C\uDF1F\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790586,\"value\":{\"gender\":\"0\",\"mobile\":\"\",\"description\":\"已删除\",\"remark\":\"D2-\",\"avatar\":\"http://wx.qlogo.cn/mmhead/50HcP4UOeLW558wFgJddibj8whkEwUxqQ0ia0YUCqYu3urPcbFoe7icrQ/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660562419\",\"externalUserId\":\"wmhFfECAAAQumuNvgZIK3T3VsqGJBGWw\",\"name\":\"^_^\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790587,\"value\":{\"gender\":\"1\",\"mobile\":\"18516050201\",\"description\":\"\",\"remark\":\"D2-18516050201\",\"avatar\":\"http://wx.qlogo.cn/mmhead/LHdtlaBo22e9ibgMTPjhhZWmojnVibkMxv2mRtsN5XGicGyKbiabRqgQFQ/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660562056\",\"externalUserId\":\"wmhFfECAAAcgb2PLzZJXtTQKRasq8foA\",\"name\":\"我若离你而去 绝不回头\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790588,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"D2-\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM4Dt70X5hmKFkvoaGIskia7q4A8LU13iaeS36K5Z1ULib8hA/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660560121\",\"externalUserId\":\"wmhFfECAAAhI1uvShbTvc_xBngsCAy7Q\",\"name\":\"善要持守\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790589,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"D1-\",\"avatar\":\"http://wx.qlogo.cn/mmhead/EWo3hwIVSD2Tn3VYEPTfp1CL5BGM68PqQttmQNPt2UPs0jQAggdB9w/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660559905\",\"externalUserId\":\"wmhFfECAAA8dYuuBFaXaZY4OrHGPTcOA\",\"name\":\"风雨无阻\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790590,\"value\":{\"gender\":\"1\",\"mobile\":\"13626868378\",\"description\":\"\",\"remark\":\"D1-13626868378\",\"avatar\":\"http://wx.qlogo.cn/mmhead/1MLz0YkS76HO4AKlPoSXWOVBj1H25DokK7Pm2a3sFFTgONjVCRX0Ww/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660557942\",\"externalUserId\":\"wmhFfECAAAy9sHhxZQBvrbb7TbwsshQA\",\"name\":\"污名点点\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790591,\"value\":{\"gender\":\"1\",\"mobile\":\"15522621193\",\"description\":\"\",\"remark\":\"D1-15522621193\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM6QI2ReJdbmhJ9Cmic31Ss6t9jRX8PV2fttVBiczcpWzCibA/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660556046\",\"externalUserId\":\"wmhFfECAAA3LYNpcAx79nr9KPdzw4MNA\",\"name\":\"2019\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790592,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"D1-\",\"avatar\":\"http://wx.qlogo.cn/mmhead/rLpHsVF9HCWqSmUHkU6DqPyzH9w7HbBQlzicViajGAa4dL6WpnbgqG3g/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660554394\",\"externalUserId\":\"wmhFfECAAAI5cXaETIpFZ8IVv4rscO9g\",\"name\":\"顶上集成吊顶刘洪瑞16639426991\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790593,\"value\":{\"gender\":\"2\",\"mobile\":\"18602280002\",\"description\":\"\",\"remark\":\"D1-18602280002\",\"avatar\":\"http://wx.qlogo.cn/mmhead/ib3knMb1MtH8wSH7UhfA4VVqLJLI1s5R1tKic78GdDwU8/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660551985\",\"externalUserId\":\"wmhFfECAAAsYXbtK8izOxEOvXo09Kueg\",\"name\":\"isabella－陈爷\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790594,\"value\":{\"gender\":\"1\",\"mobile\":\"15750859777\",\"description\":\"\",\"remark\":\"D1-15750859777\",\"avatar\":\"http://wx.qlogo.cn/mmhead/PiajxSqBRaEIdXcDTIDFglL3BCwIvYBzzzcaK4lAVial7YcQ6OkZFmfQ/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660551720\",\"externalUserId\":\"wmhFfECAAA0Nf1oTIOxpMm3wjE_XQpOg\",\"name\":\"陈荣15750859777\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790595,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"个微加\",\"avatar\":\"http://wx.qlogo.cn/mmhead/PiajxSqBRaELl2Pbd6l9iauODtfCAC0CNricSB84C9HegibArBxWsC4nZg/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660550082\",\"externalUserId\":\"wmhFfECAAAKt03R2TlUUBm8J7IZbJebw\",\"name\":\"peacesells\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790596,\"value\":{\"gender\":\"1\",\"mobile\":\"13917811203\",\"description\":\"101328150\",\"remark\":\"101328150-赵欣\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM7p0sZa1HbdP45ZbASXMA5V7DrshiboKvWX92Dfo0pMiclw/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660549672\",\"externalUserId\":\"wmhFfECAAAnUWhNqhrYH7pjCjNOJfAGQ\",\"name\":\"道哥\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790597,\"value\":{\"gender\":\"1\",\"mobile\":\"15975432081\",\"description\":\"\",\"remark\":\"D1-15975432081\",\"avatar\":\"http://wx.qlogo.cn/mmhead/PiajxSqBRaEIau3UeThoetdSOQXibpXNlibqXnujGKhlyxcibxdkpQ1SKQ/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660549522\",\"externalUserId\":\"wmhFfECAAAHZlS606ClQr93Y0M9ATh6w\",\"name\":\"某某\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790598,\"value\":{\"gender\":\"1\",\"mobile\":\"18190109589\",\"description\":\"\",\"remark\":\"D1-18190109589\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Ehg3EdEicgUEvEL3AugRmQMu2I8ibX5S0GWdemM3xXpic0/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660549283\",\"externalUserId\":\"wmhFfECAAAujRY1Ggs51m4CdT79fTgOQ\",\"name\":\"媔具\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790599,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"D1-13792009356\",\"avatar\":\"http://wx.qlogo.cn/mmhead/nic2ygrazibtRjJvD5cg3go1ndtwVmhJ3LP0WozdaibdbY/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660549018\",\"externalUserId\":\"wmhFfECAAA0nyhIC2iXT6R-GbquM3O9Q\",\"name\":\"莒县荣兴塑料公司\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790600,\"value\":{\"gender\":\"1\",\"mobile\":\"15777509922\",\"description\":\"\",\"remark\":\"D1-15777509922\",\"avatar\":\"http://wx.qlogo.cn/mmhead/JcDicrZBlREiavYLbQrcaWnSg3pC4FNgVz5aMBP9BVbU3rtehH0ibpMLQ/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660547156\",\"externalUserId\":\"wmhFfECAAAH144gBJRZfSUSt7ZZ4H1WQ\",\"name\":\"。。。。\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790601,\"value\":{\"gender\":\"2\",\"mobile\":\"18571593399\",\"description\":\"\",\"remark\":\"D1-18571593399\",\"avatar\":\"http://wx.qlogo.cn/mmhead/k947icPboBqCqaOgqicMo1k3OUYzoM9GAjXynG6e7pmtTlJVBMiaLUp4g/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660545857\",\"externalUserId\":\"wmhFfECAAAEihUN4iuI3T88iM0Fje91A\",\"name\":\"伊伊\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790602,\"value\":{\"gender\":\"1\",\"mobile\":\"18201071336\",\"description\":\"\",\"remark\":\"D1-18201071336\",\"avatar\":\"http://wx.qlogo.cn/mmhead/UDa9R1yl9Ua2Ld4ib8nmegq51C5r01icxaZbjfLuLv5IGDvgdlV8efVA/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660545523\",\"externalUserId\":\"wmhFfECAAA-pV1eTLNPrF8kQlpaz8csw\",\"name\":\"独钓寒江雪\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790603,\"value\":{\"gender\":\"1\",\"mobile\":\"18735445079\",\"description\":\"\",\"remark\":\"D1-18735445079\",\"avatar\":\"http://wx.qlogo.cn/mmhead/wJibWkqN1bUNvbWlj6QMKicicj3ibD7GgI21qvvtSic1rFCenpNM8fh8gyQ/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660545059\",\"externalUserId\":\"wmhFfECAAAjQaLavlzGuVM9gZjhkG4tw\",\"name\":\"C  \"  f宝 づ、\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790604,\"value\":{\"gender\":\"1\",\"mobile\":\"18684671178\",\"description\":\"\",\"remark\":\"D1-18684671178\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM562AmicTw7WLaMTju8p23cr0kDs6R6k1JkIFibZxZgOEag/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660544054\",\"externalUserId\":\"wmhFfECAAAy_qaVnt831vB-m-TCLpjBA\",\"name\":\"闽子\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790605,\"value\":{\"gender\":\"1\",\"mobile\":\"13958281646\",\"description\":\"\",\"remark\":\"D1-13958281646\",\"avatar\":\"http://wx.qlogo.cn/mmhead/ZeicjbjNtXwMopTpKwGn5sK1bPXicBc1u2ia0GdlSOo7gg/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660543856\",\"externalUserId\":\"wmhFfECAAA4SUSqgfucZldUo8w2tZmMg\",\"name\":\"MrJYZ\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790606,\"value\":{\"gender\":\"1\",\"mobile\":\"13223960671\",\"description\":\"\",\"remark\":\"D1-13223960671\",\"avatar\":\"http://wx.qlogo.cn/mmhead/8h9QXaJ70ibcf24yL3iaPIKJPibiaZW8LUZvegubN86UsKKItiaF5Vcjp6Q/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660543414\",\"externalUserId\":\"wmhFfECAAAijT8_pHiUAxVGidHtfajRQ\",\"name\":\"王东峰13223960671\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790607,\"value\":{\"gender\":\"2\",\"mobile\":\"13482859959\",\"description\":\"\",\"remark\":\"D1-13482859959\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM5owta2ibRbm4dNmfU3WNvcWSuiaicItic4J620Iia2iaNTRRrw/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660543223\",\"externalUserId\":\"wmhFfECAAAKg2QGqc6DVMDLsZa7HhpfA\",\"name\":\"空婧子\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790608,\"value\":{\"gender\":\"1\",\"mobile\":\"15218747497\",\"description\":\"\",\"remark\":\"101327169\",\"avatar\":\"http://wx.qlogo.cn/mmhead/DQgGDOqYFIYaHoFIAuyUHDoMCgiaEvpibVQTCugQ0GUaH4slCZmp6FGA/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660542699\",\"externalUserId\":\"wmhFfECAAAtIX-ZOZiMU2oytIugZ51og\",\"name\":\"\uD83C\uDF49\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790609,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"D1-\",\"avatar\":\"http://wx.qlogo.cn/mmhead/CJ35Z2cnZA1hrFHNtglj85E763mfwgPabocFTkovtxHspXXldetjpA/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660542458\",\"externalUserId\":\"wmhFfECAAAZreGfwj39aM-115ljIvNww\",\"name\":\"九零后大叔\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790610,\"value\":{\"gender\":\"1\",\"mobile\":\"13923677343\",\"description\":\"\",\"remark\":\"D1-13923677343\",\"avatar\":\"http://wx.qlogo.cn/mmhead/PFPUMLY8F76yFXWibpWiaRvaJOicRZOR5mF9P0tQKLLBlYI3ymBicprCrg/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660541745\",\"externalUserId\":\"wmhFfECAAAoX-e3zywfXRbXwJmyxngfw\",\"name\":\"建业制版 忠\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790611,\"value\":{\"gender\":\"1\",\"mobile\":\"13777406209\",\"description\":\"\",\"remark\":\"D1-13777406209\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM7XV7LX2AVEulTtaEZhLvOO3AGnnsMMlCdgRDA9N7iaITw/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660541645\",\"externalUserId\":\"wmhFfECAAAQh2IyS2uxBQeAcRayuD2TA\",\"name\":\"鱼&羊\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790612,\"value\":{\"gender\":\"2\",\"mobile\":\"18522268880\",\"description\":\"\",\"remark\":\"D1-18522268880\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM6IpeF3FriazS7icdzY0oDapkslwViav9ricX0t1fiaXTCJGSQ/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660540865\",\"externalUserId\":\"wmhFfECAAAMR3cT-UzNUxlSKTYjwEFsQ\",\"name\":\"路儿\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790613,\"value\":{\"gender\":\"1\",\"mobile\":\"15219709341\",\"description\":\"\",\"remark\":\"D1-15219709341\",\"avatar\":\"http://wx.qlogo.cn/mmhead/OU2rqvx645ukCON7P7149zFu5qMTma2SaMic24G3Mdv4w00mfQyPrmw/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660540799\",\"externalUserId\":\"wmhFfECAAAkOlCQyR9B8vvUTiJIh0A4w\",\"name\":\"阿何专业回收锂电池15219709341\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790614,\"value\":{\"gender\":\"0\",\"mobile\":\"17865195321\",\"description\":\"\",\"remark\":\"D1-17865195321\",\"avatar\":\"http://wx.qlogo.cn/mmhead/PiajxSqBRaEJcC4TmO1yVLRVeKLHibScgYxUnweTcwVvuRgbk1pI2Mdw/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660540120\",\"externalUserId\":\"wmhFfECAAANOWnNKeCI4GLafVbbT0NEg\",\"name\":\"通达\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790615,\"value\":{\"gender\":\"1\",\"mobile\":\"17784468263\",\"description\":\"\",\"remark\":\"D1-17784468263\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM4qqGvB0n5D3z9p4qctRTApWC37p49IPiaf62av75A5RvA/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660539673\",\"externalUserId\":\"wmhFfECAAAmxWp_SUaWuyzWGx_AiKl7g\",\"name\":\"邹先生\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790616,\"value\":{\"gender\":\"1\",\"mobile\":\"15013622448\",\"description\":\"\",\"remark\":\"D1-15013622448\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM4lHgdTbXsP5nuyLFRxorpF4wx0XX0cBLAicnCIslcuOew/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660535596\",\"externalUserId\":\"wmhFfECAAAnNl3vjuHmMEyA1n_UGqxRg\",\"name\":\"真相大白\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790617,\"value\":{\"gender\":\"1\",\"mobile\":\"13535302678\",\"description\":\"\",\"remark\":\"D1-13535302678\",\"avatar\":\"http://wx.qlogo.cn/mmhead/PiajxSqBRaEKWr7zfXibFTWQKudXw6EZs3SocShQ18ibl8OgzrtT2Ptrg/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660534311\",\"externalUserId\":\"wmhFfECAAAy2BZIN1x5jyBMXBfrCSW5g\",\"name\":\"木林森园艺\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790618,\"value\":{\"gender\":\"1\",\"mobile\":\"15818573891\",\"description\":\"\",\"remark\":\"D1-15818573891\",\"avatar\":\"http://wx.qlogo.cn/mmhead/gWicbXPiajJnibwiawL6IxmzMDzDlHaibMpjOOG5rNRZlcZXfUIYy9nVdsg/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660534177\",\"externalUserId\":\"wmhFfECAAAgh-sEL79wamzsHDnhau9Zg\",\"name\":\"力源劳务孔令银\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790619,\"value\":{\"gender\":\"1\",\"mobile\":\"15929997371\",\"description\":\"\",\"remark\":\"D1-15929997371\",\"avatar\":\"http://wx.qlogo.cn/mmhead/bSb5dSzPn0ITME32GoZTlw2K4Sx9Wekk5nML7ww7zNk28ybOkO87zw/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660533911\",\"externalUserId\":\"wmhFfECAAA4woq0q-8j7mAFdZH7w6x-Q\",\"name\":\"妄念 -\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790620,\"value\":{\"gender\":\"2\",\"mobile\":\"15163027585\",\"description\":\"\",\"remark\":\"D1-15163027585\",\"avatar\":\"http://wx.qlogo.cn/mmhead/fWJhv9xMFTseibw1aG1ycvRwyrbNCeLHFAIkDB2CqCZsnIXRkibKWjeQ/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660533541\",\"externalUserId\":\"wmhFfECAAAPkSXHlvpa8oQeTNpbCMwGA\",\"name\":\"桃桃杨乐多\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790621,\"value\":{\"gender\":\"1\",\"mobile\":\"13582314706\",\"description\":\"\",\"remark\":\"D1-13582314706\",\"avatar\":\"http://wx.qlogo.cn/mmhead/xx0dmmXsqvknLx7eIRJDRfUPjrQtUkc8gURhX6ry63g/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660531440\",\"externalUserId\":\"wmhFfECAAAL1jYu8MLOuPbctBWdZiuGA\",\"name\":\"挪亚\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790622,\"value\":{\"gender\":\"0\",\"mobile\":\"18827099145\",\"description\":\"\",\"remark\":\"D1-18827099145\",\"avatar\":\"http://wx.qlogo.cn/mmhead/JiavaWZxX4YvLK0HkLIZNf5iaPFTWOqE9VRtdX5tol3MicEp1ULXttscA/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660531253\",\"externalUserId\":\"wmhFfECAAAHXeJnh_1_cv3H7YT5SW_JQ\",\"name\":\"俗人\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790623,\"value\":{\"gender\":\"1\",\"mobile\":\"18660231373\",\"description\":\"\",\"remark\":\"D1-18660231373\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM5XMGia5DMVgTA1lK2RhU9vvibsXACfTLGZ082s5TmZkE0g/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660531201\",\"externalUserId\":\"wmhFfECAAAgo1KoqYz_iswTmn3iqV0ZA\",\"name\":\"穿插游击队\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790624,\"value\":{\"gender\":\"2\",\"mobile\":\"15973398007\",\"description\":\"个微加\",\"remark\":\"D1-15973398007\",\"avatar\":\"http://wx.qlogo.cn/mmhead/PiajxSqBRaELHUUWJBCznagmvgphIDPuhDoL8u0myRUCibpx3ypt2dGQ/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660531200\",\"externalUserId\":\"wmhFfECAAAcOQvuFBVtUzhHBt38yoYIg\",\"name\":\"aa李\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790625,\"value\":{\"gender\":\"1\",\"mobile\":\"19912806470\",\"description\":\"个微加\",\"remark\":\"D1-19912806470\",\"avatar\":\"http://wx.qlogo.cn/mmhead/QAm7hEbaujTlzYZ2eflVcia7ZG4lCa5mXfFEcnqGeMPicNB8mOEvvfRQ/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660529859\",\"externalUserId\":\"wmhFfECAAAsSoycjfOQLt-eNUQS3xhjA\",\"name\":\"北笙ゞ\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790626,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"个微加\",\"avatar\":\"http://wx.qlogo.cn/mmhead/NTmXAPI6K2dFZTtJPPCFVMiaTeNpWrYTQJNfUOKA6ib5A/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660529578\",\"externalUserId\":\"wmhFfECAAAr_dxitB99Db4I2yeX6Mueg\",\"name\":\"大头：鞋材 \uD83D\uDC5F压花\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790627,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"个微加\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM7bOubm597p9HRNgb8vGTX5iaL4x1R1wTL8aHicrfAS2bSQ/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660529553\",\"externalUserId\":\"wmhFfECAAATwzaW5IUe0mziq1AmFytOA\",\"name\":\"满船清梦\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790628,\"value\":{\"gender\":\"2\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"个微加\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM7pic346uWWnMxC8MmEfyU7icVrXjy56CYGEtFtj9jtEtYQ/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660529535\",\"externalUserId\":\"wmhFfECAAAXZPcGjYY4Lk4Avp6RMHTgw\",\"name\":\"Lucky \uD83C\uDF08\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790629,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"个微加\",\"avatar\":\"http://wx.qlogo.cn/mmhead/PiajxSqBRaEJpeSVXdgciaAHJegHw5m9YOConGWmx1D1Lx2jv0ZgnEMg/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660529517\",\"externalUserId\":\"wmhFfECAAA66k85sDyoJDOCCCZvAdVhg\",\"name\":\"\uD83C\uDF40三叶草\uD83D\uDC0E\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790630,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"D1-18108285800个微加\",\"avatar\":\"http://wx.qlogo.cn/mmhead/RgIELYBm9T4Jia7Cpy1pgfZIbS1jljEN4YHfVibmctib44/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660529183\",\"externalUserId\":\"wmhFfECAAA271DuTYHyvnYRSda1ESw7g\",\"name\":\"帅宇\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790631,\"value\":{\"gender\":\"1\",\"mobile\":\"13573101187\",\"description\":\"101326689\",\"remark\":\"101326689-聂荣富\",\"avatar\":\"http://wx.qlogo.cn/mmhead/JcDicrZBlREgia1b8h9vcRX4os3D3o1I05rtugj6htNnp5aVoeFUCxSA/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660529171\",\"externalUserId\":\"wmhFfECAAAK3__5_eC_jy8JNQD19HNVQ\",\"name\":\"Jay\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790632,\"value\":{\"gender\":\"2\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"D1-13002129076个微加\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM4YFJKHzMv0icdFSKMBZiaiaQJM6gBUHG92nXk6u7FADxS5Q/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660529156\",\"externalUserId\":\"wmhFfECAAACeBpURXnSyZ6OQEElfQmUQ\",\"name\":\"Summer\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790633,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"个微加\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM7IJ0aliapYicXcV0mwv9jGw6LE8Cv9r5xIvLUkkPRLvATw/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660529133\",\"externalUserId\":\"wmhFfECAAAT8zVMRITTMPJ6l06i_P4gQ\",\"name\":\"堅\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790634,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"D1-17784468263个微加\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM4qqGvB0n5D3z9p4qctRTApWC37p49IPiaf62av75A5RvA/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660529091\",\"externalUserId\":\"wmhFfECAAAmxWp_SUaWuyzWGx_AiKl7g\",\"name\":\"邹先生\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790635,\"value\":{\"gender\":\"1\",\"mobile\":\"13487108640\",\"description\":\"\",\"remark\":\"D1-13487108640\",\"avatar\":\"http://wx.qlogo.cn/mmhead/WmwqjsSBsZLicnaLwib9ebeBcueKy2j553C0xxm1XEvAIl1GhwEl59Nw/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660527064\",\"externalUserId\":\"wmhFfECAAACrP64DssMCR2BTS4LQe9Pg\",\"name\":\"戒酒\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790636,\"value\":{\"gender\":\"1\",\"mobile\":\"13735299774\",\"description\":\"\",\"remark\":\"D1-13735299774\",\"avatar\":\"http://wx.qlogo.cn/mmhead/ic7Siag5V11z6qq769deJ0PQ132TaTmDqvpYb8cA0d5icQ/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660524928\",\"externalUserId\":\"wmhFfECAAA1Aog4K61hikcuJ4wtwci_Q\",\"name\":\"金司令\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790637,\"value\":{\"gender\":\"1\",\"mobile\":\"15655407039\",\"description\":\"\",\"remark\":\"D1-17364338881\",\"avatar\":\"http://wx.qlogo.cn/mmhead/NoFChqEQomETV2jYMGIw8tQJlwHhXWY8Op0ibHlibpwicPLic695fH0pPg/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660524337\",\"externalUserId\":\"wmhFfECAAAWAx3yuzTYprtqxvFGdQnug\",\"name\":\"晚\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790638,\"value\":{\"gender\":\"1\",\"mobile\":\"13285913600\",\"description\":\"\",\"remark\":\"D1-13285913600\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM6CcrSAltlIUWYGJNrJ1wwJO5rozicUaJX0lkORBKOt9lQ/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660523416\",\"externalUserId\":\"wmhFfECAAAszT7YG-HEx3vWopiXvqnQg\",\"name\":\"林\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790639,\"value\":{\"gender\":\"1\",\"mobile\":\"13760603343\",\"description\":\"个微加\",\"remark\":\"D1-13760603343\",\"avatar\":\"http://wx.qlogo.cn/mmhead/7SPO0mRJt6CNrIAUQYrTWia5vJRMMROC8F0jTHS1KbDcugW2l2e7gsw/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660522132\",\"externalUserId\":\"wmhFfECAAAsSjchwPAdXnwxlEx0WJZ2Q\",\"name\":\"Liang\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790640,\"value\":{\"gender\":\"2\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"D1-\",\"avatar\":\"http://wx.qlogo.cn/mmhead/PiajxSqBRaELibljOPPdl8ZY0ec0W4BvTmoQzeZbexJt7enK1oJ0afBQ/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660520651\",\"externalUserId\":\"wmhFfECAAAFjIZ-8cdNmMj4qgZwFtdwA\",\"name\":\"氓\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790641,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"D1-15869025102\",\"avatar\":\"http://wx.qlogo.cn/mmhead/PiajxSqBRaELCg10NsjmVLmolJCAfBQNGib0bhzKuxErARFe91JaiarQQ/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660516786\",\"externalUserId\":\"wmhFfECAAApaRSZvIsBVSrjITUVULCzA\",\"name\":\"纱罩灯\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790642,\"value\":{\"gender\":\"1\",\"mobile\":\"13028209137\",\"description\":\"\",\"remark\":\"D1-13028209137\",\"avatar\":\"http://wx.qlogo.cn/mmhead/9UjCmequjUibHfWxX67MNt92Xu4K4ESh6JlVqTLw42v8z4aCTNrWqibQ/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660515145\",\"externalUserId\":\"wmhFfECAAAYi2zClYVUMRFiggQgSOv8g\",\"name\":\"LZC\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790643,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"D1-\",\"avatar\":\"http://wx.qlogo.cn/mmhead/ybvwhU1RFxmn3ich29KjZoRZCxR3I4IgRkAlYMB2KqgQ/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660496446\",\"externalUserId\":\"wmhFfECAAAuqjgvCmFZKhhoH8Wax2_Jw\",\"name\":\"A.  ꯭黃꯭ ꯭華꯭ จุ๊บ\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790644,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"D1-已删除\",\"avatar\":\"http://wx.qlogo.cn/mmhead/hIz3ylFIYS9zY50Mviatiajk5TReAlkRYbb8icNiaZW5kcqvZznkICbTmA/0\",\"type\":\"1\",\"followUserId\":\"qiqi\",\"createTime\":\"1660496011\",\"externalUserId\":\"wmhFfECAAAHAkqAs_ej4bbJQDPkcjrSQ\",\"name\":\"安安   ™\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790645,\"value\":{\"gender\":\"1\",\"mobile\":\"17550136668\",\"description\":\"\",\"remark\":\"D1-17550136668\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM7gnC4lMPa2jrRzdupbhuCHN9LiaZJKNZjc5aaib7WJodCA/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660486814\",\"externalUserId\":\"wmhFfECAAAqRoSg7_8QNzTELhGjAvo7w\",\"name\":\"许昌小东油料批发回收各种饼\"}},{\"topic\":\"sync_external_user_status\",\"offset\":1790646,\"value\":{\"gender\":\"1\",\"mobile\":\"\",\"description\":\"\",\"remark\":\"D1-\",\"avatar\":\"http://wx.qlogo.cn/mmhead/Q3auHgzwzM5KcE87aQK8tkNvj19aplmR1H5JK0kWJnqhSGkTpic7bicg/0\",\"type\":\"1\",\"followUserId\":\"mzg\",\"createTime\":\"1660484830\",\"externalUserId\":\"wmhFfECAAAYE9YHJqZVeTSo6OZLnuZTQ\",\"na,me\":\"旺仔\"}}]}";

        JSONObject inJson = new JSONObject();

            try {
                try {
                    log.debug("使用SF Json解析(默认)");
                    inJson = JSONObject.fromObject(inData);
                } catch (Exception e) {
                    log.warn("使用SF Json解析(默认)异常信息Exception:" + e.getMessage());
                    String inDataF = filterJson(inData);
                    log.debug("使用SF Json解析(特殊字符过滤后):" + inDataF);
                    inJson = JSONObject.fromObject(inDataF);
                }
            } catch (Exception e) {
                try {
                    log.debug("使用SF Json解析(特殊字符过滤后)异常信息Exception:" + e.getMessage());
                    inJson = JSONObject.fromObject(com.alibaba.fastjson.JSONObject.parseObject(inData));
                } catch (Exception e2) {
                    log.warn("使用fastjson Json解析(默认)异常信息Exception:" + e.getMessage());
                    String inDataF = filterJson(inData);
                    log.debug("使用fastjson Json解析(特殊字符过滤后):" + inDataF);
                    inJson = JSONObject.fromObject(com.alibaba.fastjson.JSONObject.parseObject(inDataF));
                }
            }

        System.err.println(inJson);
    }

    public static String filterJson(String inData) {
        List<String> filterList = new ArrayList<>();
        filterList.add("\\\\");
        filterList.add("¥");
        filterList.add("@");
        filterList.add("\b");
        filterList.add("\f");
        filterList.add("\n");
        filterList.add("\n");
        filterList.add("\t");

        for (int i = 0; i < filterList.size(); i++) {
            inData = inData.replaceAll(filterList.get(i), "");
        }
        inData = inData.replaceAll("'", "''");
        inData = toJsonString(inData);
        return inData;
    }

    // 处理json字符串中value多余的双引号， 将多余的双引号替换为中文双引号
    private static String toJsonString(String s) {
        char[] tempArr = s.toCharArray();
        int tempLength = tempArr.length;
        for (int i = 0; i < tempLength; i++) {
            if (tempArr[i] == ':' && tempArr[i + 1] == '"') {
                for (int j = i + 2; j < tempLength; j++) {
                    if (tempArr[j] == '"') {
                        if (tempArr[j + 1] != ',' && tempArr[j + 1] != '}') {
                            tempArr[j] = '”'; // 将value中的 双引号替换为中文双引号
                        } else if (tempArr[j + 1] == ',' || tempArr[j + 1] == '}') {
                            break;
                        }
                    }
                }
            }
        }
        return new String(tempArr);
    }
}
